<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
</head>
<style>
	.myTbl{
		height:200px;
		width:90%;
		border-collapse: collapse;
	}
	.myTbl tbody tr td{
		border:1px solid #aaa;
		padding:.2em .5em;
		text-align:center;
	}
	.myTbl tbody tr td:first-child{
		white-space: nowrap;
	}
</style>
<body style="margin:0 auto; width:1200px;">
<table class="myTbl">
	<thead>
		<tr>
			<th colspan=2>CTRM help me!</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td><a href="logs/system.log">日志</a></td>
			<td rowspan=5>
				<textarea name="myText" id="myText" style="height:100%; width:100%;border:0;"></textarea>
			</td>
		</tr>
		<tr>
			<td><a href="api/test">服务启动测试</a></td>
		</tr>
		<tr>
			<td><a href="api/refreshDatasource">刷新数据源</a></td>
		</tr>
		<tr>
			<td><a href="javascript:void(0)" onclick="clearSecondLevelCache()">清空二级缓存</a></td>
		</tr>
		<tr>
			<td><a href="javascript:void(0)" onclick="exec()">执行sql语句</a></td>
		</tr>
	</tbody>
</table>
</body>
<script>
	function clearSecondLevelCache(){
		document.location.href = "api/clearSecondLevelCache";
	}
	function exec(){
		if(confirm("Notice，会更新所有数据源！")) {
			document.location.href = "api/exec?sql="+document.getElementById("myText").value;
		}
	}
</script>
</html>